﻿using System;
using System.Web;

namespace MSP.Data.Domain.Enums
{
    public class LocalizableDescriptionAttribute : Attribute
    {
        public string ClassKey { get; set; }
        public string ResourceKey { get; set; }
        public string Description
        {
            get
            {
                return (string)HttpContext.GetLocalResourceObject(ClassKey, ResourceKey);
            }
        }

        public LocalizableDescriptionAttribute(string classKey, string resourceKey)
        {
            ClassKey = classKey;
            ResourceKey = resourceKey;
        }
    }
}
